/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.citi.dahg.cve;

import com.citi.dahg.cve.controller.model.Usuario;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

/**
 *
 * @author dh90940
 */
@ManagedBean
@SessionScoped
public class UsuarioBean extends BasicManagedBean {
    
    private Usuario current;

    public Usuario getCurrent() {
        return current;
    }

    public void setCurrent(Usuario current) {
        this.current = current;
    }
    
    public String logout() {
        current = null;
        return "login";
    }
    
    public boolean isActivo() {
        return (current!=null);
    }
    
}
